const path = require('path')

module.exports = {
  mode: "none",
  entry: "./src/index.js",
  output: {
    filename: "bundle.js",
    path: path.join(__dirname, "output/dist"),
    publicPath: 'dist/' // 其中 /不能省略
  },
  module: {
    rules: [{
      test: /.jpg$/,
      use: [
        {
          loader: 'url-loader',
          options: {
            limit: 10 * 1024 // 10k 以下的文件转换为 data url
          }
        }
      ]
    }]
  }
}